function writeFlashSecure(url,w,h,bg,id,flashvars) {
	var code='<OB'+'JECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+w+'" HEIGHT="'+h+'" id="'+id+'"><PARAM NAME=scale VALUE=noborder><PARAM NAME=salign VALUE=tl><PARAM NAME=movie VALUE="'+url+'"><PARAM NAME=quality VALUE=high><PARAM NAME=menu VALUE=false><PARAM NAME=bgcolor VALUE='+bg+'><PARAM NAME=FlashVars VALUE="'+flashvars+'"><EM'+'BED src="'+url+'" FlashVars="'+flashvars+'" quality=high bgcolor='+bg+' WIDTH="'+w+'" HEIGHT="'+h+'" NAME="'+id+'" SCALE="noborder" SALIGN="tl" menu="false" TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://www.macromedia.com/go/getflashplayer"></E'+'MBED></OB'+'JECT>';

	document.write(code);
}

function writeFlash(url,w,h,bg,id,flashvars) {
	var code='<OB'+'JECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" 	WIDTH="'+w+'" HEIGHT="'+h+'" id="'+id+'"><PARAM NAME=movie VALUE="'+url+'"><PARAM NAME=quality VALUE=high><PARAM NAME=menu VALUE=false><PARAM NAME=bgcolor VALUE='+bg+'><PARAM NAME=FlashVars VALUE="'+flashvars+'"><param name="allowScriptAccess" value="never"><param name="allowNetworking" value="internal"><EM'+'BED src="'+url+'" allowScriptAccess="never" allowNetworking="internal" FlashVars="'+flashvars+'" quality=high bgcolor='+bg+' WIDTH="'+w+'" HEIGHT="'+h+'" NAME="'+id+'" menu="false" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></E'+'MBED></OB'+'JECT>';

	document.write(code);
}

function writeQT(url,w,h,bg,id) {
	var code='<OB'+'JECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="'+w+'" HEIGHT="'+(h+16)+'"CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" id="'+id+'"><PARAM name="SRC" VALUE="'+url+'"><PARAM name="AUTOPLAY" VALUE="true"><PARAM name="CONTROLLER" VALUE="true"><EMBED SRC="$file" WIDTH="'+w+'" HEIGHT="'+(h+16)+'" AUTOPLAY="false" CONTROLLER="true" NAME="'+id+'" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></E'+'MBED></OB'+'JECT>';

	document.write(code);

}

function writeMP3(url,w,h,bg,id) {
	var code='<OB'+'JECT classid="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A" width="'+w+'" height="'+h+'" id="'+id+'"><param name="FileName" value="'+url+'"><param name="type" value="application/x-mplayer2"><param name="PlayCount" value="1"><param name="Volume" value="1"><param name="ShowControls" value="true"><param name="ShowDisplay" value="true"><embed type="application/x-mplayer2" playcount= "1" width="'+w+'" height="'+h+'" filename="'+url+'" volume="1" showcontrols="true" showdisplay="true" src="'+url+'" NAME="'+id+'"></E'+'MBED></OB'+'JECT>';

	document.write(code);
}

function popUp(url,width,height){
	w=window.open(url, 'p','width='+width+',height='+height+',toolbar=no,location=no,directories=no,menubar=no,status=1,resizable=no,scrollbars=no');

	if (w)
		w.focus();	

}

function newWin(url){
	window.open(url);
}

function email(a,d,e,c) {
	var f = 'ma';
	var s = 'il';
	var t = 'to:';
	var e = a+'&#64;'+d+'.'+e;
	document.write('<a href="'+f+s+t+e+'"'+(c!=''?' class="'+c+'" ':'')+'>'+e+'</a>');
}

function searchBoxFocusIn() {
	if (document.search_form.q.value=="Search..")
		document.search_form.q.value="";
}

function searchBoxFocusOut() {
	if (document.search_form.q.value=="")
		document.search_form.q.value="Search..";
}


//mm
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
